package com.sk.cardeal.entity;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by sk on 2018/4/13.
 */

public class ByPartsEntity implements Parcelable {

    private String partsId;
    private String partsName;
    private String partsOeCode;
    private String partsCount;
    private String partsQualityList;
    private String brandName;
    private String brandCode;
    private String priceQx;
    private String stockNum;
    private String vin;
    private String mileage;
    private String name;
    private String price;
    private int selectCount = 1;
    private String editPrice = "";
    private boolean isEdit = false;
    private String pid;

    public String getPid() {
        return pid;
    }

    public void setPid(String pid) {
        this.pid = pid;
    }

    public boolean isEdit() {
        return isEdit;
    }

    public void setEdit(boolean edit) {
        isEdit = edit;
    }

    public int getSelectCount() {
        return selectCount;
    }

    public void setSelectCount(int selectCount) {
        this.selectCount = selectCount;
    }

    public String getEditPrice() {
        return editPrice;
    }

    public void setEditPrice(String editPrice) {
        this.editPrice = editPrice;
    }

    public String getPartsId() {
        return partsId;
    }

    public void setPartsId(String partsId) {
        this.partsId = partsId;
    }

    public String getPartsName() {
        return partsName;
    }

    public void setPartsName(String partsName) {
        this.partsName = partsName;
    }

    public String getPartsOeCode() {
        return partsOeCode;
    }

    public void setPartsOeCode(String partsOeCode) {
        this.partsOeCode = partsOeCode;
    }

    public String getPartsCount() {
        return partsCount;
    }

    public void setPartsCount(String partsCount) {
        this.partsCount = partsCount;
    }

    public String getPartsQualityList() {
        return partsQualityList;
    }

    public void setPartsQualityList(String partsQualityList) {
        this.partsQualityList = partsQualityList;
    }

    public String getBrandName() {
        return brandName;
    }

    public void setBrandName(String brandName) {
        this.brandName = brandName;
    }

    public String getBrandCode() {
        return brandCode;
    }

    public void setBrandCode(String brandCode) {
        this.brandCode = brandCode;
    }

    public String getPriceQx() {
        return priceQx;
    }

    public void setPriceQx(String priceQx) {
        this.priceQx = priceQx;
    }

    public String getStockNum() {
        return stockNum;
    }

    public void setStockNum(String stockNum) {
        this.stockNum = stockNum;
    }

    public String getVin() {
        return vin;
    }

    public void setVin(String vin) {
        this.vin = vin;
    }

    public String getMileage() {
        return mileage;
    }

    public void setMileage(String mileage) {
        this.mileage = mileage;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPrice() {
        return price;
    }

    public void setPrice(String price) {
        this.price = price;
    }

    public ByPartsEntity() {
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.partsId);
        dest.writeString(this.partsName);
        dest.writeString(this.partsOeCode);
        dest.writeString(this.partsCount);
        dest.writeString(this.partsQualityList);
        dest.writeString(this.brandName);
        dest.writeString(this.brandCode);
        dest.writeString(this.priceQx);
        dest.writeString(this.stockNum);
        dest.writeString(this.vin);
        dest.writeString(this.mileage);
        dest.writeString(this.name);
        dest.writeString(this.price);
        dest.writeInt(this.selectCount);
        dest.writeString(this.editPrice);
        dest.writeByte(this.isEdit ? (byte) 1 : (byte) 0);
        dest.writeString(this.pid);
    }

    protected ByPartsEntity(Parcel in) {
        this.partsId = in.readString();
        this.partsName = in.readString();
        this.partsOeCode = in.readString();
        this.partsCount = in.readString();
        this.partsQualityList = in.readString();
        this.brandName = in.readString();
        this.brandCode = in.readString();
        this.priceQx = in.readString();
        this.stockNum = in.readString();
        this.vin = in.readString();
        this.mileage = in.readString();
        this.name = in.readString();
        this.price = in.readString();
        this.selectCount = in.readInt();
        this.editPrice = in.readString();
        this.isEdit = in.readByte() != 0;
        this.pid = in.readString();
    }

    public static final Creator<ByPartsEntity> CREATOR = new Creator<ByPartsEntity>() {
        @Override
        public ByPartsEntity createFromParcel(Parcel source) {
            return new ByPartsEntity(source);
        }

        @Override
        public ByPartsEntity[] newArray(int size) {
            return new ByPartsEntity[size];
        }
    };
}
